<template>
	<view>
		<!-- 页面标题头begin -->
		<view class="smart-page-head">
			<view class="smart-page-head-title">radio单选按钮</view>
		</view>
		<!-- 页面标题头end -->
		<view>
			<radio color="#ffaa00" :checked="state" class="miniRadio" @click="change"></radio>选中
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				state: false
			}
		},
		methods: {
			change() {
				console.log('click.....');
				if (this.state)
					this.state = false;
				else
					this.state = true;
			}
		}
	}
</script>

<style>
	.smart-page-head {
		padding: 20px 0;
		text-align: center;
		margin-bottom: 20px;
	}

	.smart-page-head-title {
		font-size: 24px;
		font-weight: 600;
		color: darkgray;
		display: inline-block;
		position: relative;
		padding-bottom: 8px;
	}

	.smart-page-head-title::after {
		content: '';
		position: absolute;
		left: 0;
		bottom: 0;
		width: 100%;
		height: 2px;
		background-color: lightgray;
	}

	.miniRadio {
		transform: scale(0.7);
	}
</style>